Skip to content

sycl: add find_package call for OpenCL #13643

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

AD2605
Copy link
Contributor

@AD2605 AD2605 commented May 19, 2025

The nightly dpcpp compiler recently stopped shipping libOpenCL.so.

So when one uses a nightly build of oneDNN built with the said nightly compiler, it links against the target OpenCL::OpenCL (see this line), and when using this build of oneDNN in llama, it would expect the target OpenCL::OpenCL to be available.

This PR simply adds the find_package(OpenCL) when using the nightly compiler to resolve the same.

@github-actions github-actions bot added ggml changes relating to the ggml tensor library for machine learning SYCL https://en.wikipedia.org/wiki/SYCL - GPU programming language labels May 19, 2025
@AD2605 AD2605 changed the title add find_package call for OpenCL sycl: add find_package call for OpenCL May 20, 2025
@sgeor255
Copy link
Contributor

@AD2605
Copy link
Contributor Author

AD2605 commented May 20, 2025

Shouldn't the find_package call here https://github.com/uxlfoundation/oneDNN/blob/743e4273d18bcb0e733723bf9289f14e8366687f/cmake/SYCL.cmake#L123 handle this?

This is used when building oneDNN not when building llama,
So the built oneDNN when being used in LLaMa will expect this target to be available

@Rbiessy
Copy link
Collaborator

Rbiessy commented May 20, 2025

I think Svet makes a good point. This could be fixed in the generated oneDNN config file similarly to this PR: uxlfoundation/oneDNN#2768
It seems it should try to find the OpenCL package when SYCL is enabled too.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ggml changes relating to the ggml tensor library for machine learning SYCL https://en.wikipedia.org/wiki/SYCL - GPU programming language
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants